/*************************************************
* ---- Toolbar ----
*/

.w2ui-toolbar {
    background-color: #f5f5f5;
    user-select: none;
    padding: 2px;

    .w2ui-tb-line {
        overflow: hidden;
        position: relative;
        min-height: 28px;
        padding: 0;
        margin: 0;
    }

    .disabled {
        .opacity(0.3)
    }

    .w2ui-scroll-left,
    .w2ui-scroll-right {
        z-index: 30;
        display: flex;
    }

    .w2ui-tb-line:nth-child(2),
    .w2ui-tb-line:nth-child(3),
    .w2ui-tb-line:nth-child(4) {
        border-top: 1px solid #e7e7e7;
        margin: 0;
    }

    .w2ui-scroll-wrapper {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: flex-start;
        align-content: flex-start;
        padding: 2px;

        .w2ui-tb-button {
            position: relative;
            z-index: 20;
            height: 30px;
            min-width: 30px;
            padding: 2px;
            border: 1px solid transparent;
            border-radius: 4px;
            color: black;
            background-color: transparent;
            white-space: nowrap;
            margin: 0 1px;
            cursor: default;
            user-select: none;
            flex-shrink: 0;
            // border: 1px solid silver;

            .w2ui-tb-icon {
                float: left;
                width: 22px;
                margin: 4px 0 0 1px;
                text-align: center;
                > span {
                    font-size: 15px;
                    color: #8D99A7;
                }
            }
            .w2ui-tb-text {
                margin-left: 20px;
                padding: 6px 5px 0 5px;

                .w2ui-tb-color-box {
                    display: inline-block;
                    height: 13px;
                    width: 13px;
                    margin: 0 2px -2px 0;
                    border-radius: 1px;
                    border: 1px solid #fff;
                    box-shadow: 0 0 1px #555;
                }

                .w2ui-tb-count {
                    padding: 0 0 0 4px;
                    > span {
                        border: @menu-node-count-border;
                        border-radius: 11px;
                        width: auto;
                        height: 18px;
                        padding: 0 6px 1px 6px;
                        background-color: @menu-node-count-background-color;
                        color: @menu-node-count-color;
                        box-shadow: @menu-node-count-shadow;
                        text-shadow: @menu-node-count-text-shadow;
                    }
                }

                .w2ui-tb-down {
                    width: 10px;
                    float: right;
                    > span {
                        display: inline-block;
                        position: relative;
                        top: 3px;
                        left: 3px;
                        border: 4px solid transparent;
                        border-top: 5px solid #aeb6c0;
                    }
                }
            }

            &.over {
                border: 1px solid transparent;
                background-color: #eaeaed;
                & .w2ui-tb-text {
                    color: black;
                }
            }

            &.checked {
                border: 1px solid #d2d2d2;
                background-color: white;
                & .w2ui-tb-text {
                    color: black;
                }
            }

            &.down {
                border: 1px solid #ccc;
                background-color: #eaeaed;
                & .w2ui-tb-text {
                    color: #666;
                }
            }

            &.no-icon .w2ui-tb-text {
                margin-left: 0;
            }
        }

        .w2ui-tb-right {
            width: 100%;
            text-align: right;
            white-space: nowrap;
        }

        .w2ui-tb-break {
            .linear-gradient-dark-center(#999);
            width: 1px;
            height: 24px;
            padding: 0;
            margin: 3px 6px;
       }

        .w2ui-tb-html {
            white-space: nowrap;
        }

        .w2ui-tb-input {
            padding: 1px;
            .w2ui-input-label {
                color: #474a51;
            }
            // such long selector is needed so that it would take priority over what's in .w2ui-reset and wouldn't require !important
            input:not([type=button]):not([type=submit]):not([type=checkbox]):not([type=radio]):not([type=range]) {
                width: 100px;
                height: 26px;
                padding: 5px;
                &:focus {
                    outline-color: #549eff;
                }
                &.w2ui-has-spinner {
                    width: 95px;
                    padding: 5px 30px;
                }
            }
            input[type=range] {
                position: relative;
                top: 5px;
            }
            .w2ui-spinner-dec,
            .w2ui-spinner-inc {
                position: absolute;
                padding-top: 2px;
                margin: 2px;
                background-color: #f9fafa;
                width: 22px;
                height: 22px;
                font-size: 16px;
                text-align: center;
                color: #888;
                &:hover {
                    background-color: #e4e4e4;
                    color: #222;
                }
                &:active {
                    background-color: #d4d4d4;
                    color: #000;
                }
            }
            .w2ui-spinner-dec {
                border-right: 1px solid #e0e0e0;
                border-top-left-radius: 3px;
                border-bottom-left-radius: 3px;
            }
            .w2ui-spinner-inc {
                margin-left: -24px;
                border-left: 1px solid #e0e0e0;
                border-top-right-radius: 3px;
                border-bottom-right-radius: 3px;
            }
        }

       .w2ui-tb-spacer {
            width: 100%;
       }
    }
}